﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.List, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType"))

	_DB:AddCodeHelp("OnItemChoosed", [[ScriptType, Run when the choosed item is changed]], [[OnItemChoosed(key, item, icon, frame)]])
	_DB:AddCodeHelp("OnItemDoubleClick", [[ScriptType, Run when an item is double-clicked]], [[OnItemDoubleClick(key, item, icon, frame)]])
	_DB:AddCodeHelp("OnGameTooltipShow", [[ScriptType, Run when the mouse is over an item, and the tooltip is shown]], [[OnGameTooltipShow(GameTooltip, key, item, icon, frame)]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.List, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Function"))

	_DB:AddCodeHelp("SetStyle", [=[Sets the list's style]=], [=[SetStyle(style)]=])
	_DB:AddCodeHelp("GetStyle", [=[Gets the List's style]=], [=[GetStyle()]=])
	_DB:AddCodeHelp("InsertItem", [=[Insert an item to the list]=], [=[InsertItem(index, key, text, [icon], [frame])]=])
	_DB:AddCodeHelp("SetItem", [=[Modify or add an item in the item list]=], [=[SetItem(key, text, [icon], [frame])]=])
	_DB:AddCodeHelp("SetScrollStep", [=[Sets the minimum increment between allowed slider values.]=], [=[SetScrollStep(num)]=])
	_DB:AddCodeHelp("SelectItemByText", [=[Select a item by text]=], [=[SelectItemByText(text)]=])
	_DB:AddCodeHelp("GetSelectedItemValue", [=[Gets the selected item's value]=], [=[GetSelectedItemValue()]=])
	_DB:AddCodeHelp("ResumeLayout", [=[resume the refresh of the list]=], [=[ResumeLayout()]=])
	_DB:AddCodeHelp("GetSelectedItemIndex", [=[Gets the selected item's index]=], [=[GetSelectedItemIndex()]=])
	_DB:AddCodeHelp("GetScrollStep", [=[Returns the minimum increment between allowed slider values]=], [=[GetScrollStep()]=])
	_DB:AddCodeHelp("SetList", [=[Build item list from a table]=], [=[SetList(list)]=])
	_DB:AddCodeHelp("Refresh", [=[Refresh the item list]=], [=[Refresh()]=])
	_DB:AddCodeHelp("Clear", [=[Clear the item list]=], [=[Clear()]=])
	_DB:AddCodeHelp("SelectItemByValue", [=[Select a item by value]=], [=[SelectItemByValue(value)]=])
	_DB:AddCodeHelp("SuspendLayout", [=[stop the refresh of the list]=], [=[SuspendLayout()]=])
	_DB:AddCodeHelp("GetItem", [=[Get an item's info from the item list by key]=], [=[GetItem(key)]=])
	_DB:AddCodeHelp("SelectItemByIndex", [=[Select a item by index]=], [=[SelectItemByIndex(index)]=])
	_DB:AddCodeHelp("AddItem", [=[Add an item to the list]=], [=[AddItem(key, text, [icon], [frame])]=])
	_DB:AddCodeHelp("RemoveItem", [=[Remove an item from the item list by key]=], [=[RemoveItem(key)]=])
	_DB:AddCodeHelp("GetSelectedItemText", [=[Gets the selected item's text]=], [=[GetSelectedItemText()]=])
	_DB:AddCodeHelp("GetItemByIndex", [=[Get an item's info from the item list by index]=], [=[GetItemByIndex(index)]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.List, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Property"))

	_DB:AddCodeHelp("Items", [[a table that contains Text of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("ScrollStep", [[the minimum increment between allowed slider values]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("ItemCount", [[the item's count]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Keys", [[a table that contains keys of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("Frames", [[a table that contains frames of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("Icons", [[a table that contains icons of the items]], IGAS:GetPropertyType("Table"))
	_DB:AddCodeHelp("DisplayItemCount", [[the display count in the list]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Style", [[the list's style]], IGAS:GetPropertyType("ListStyle"))
	_DB:AddCodeHelp("ShowTootip", [[whether show tooltip or not]], IGAS:GetPropertyType("boolean"))
end
